package awk;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public  class CopyOfTest extends awk.LineHandler{
    
    public static void main(String []args) throws IOException{
        logger.info("...begin to get file context...") ;

        BufferedReader in = new BufferedReader(new FileReader("D:\\project\\jmon\\jmon.log"));
        StringBuilder sb = new StringBuilder();

        String line="";
        int i=0;
        FS=";" ;
        while ((line = in.readLine()) != null) {
            System.out.println(line) ;
            String [] dd;
            ++i ;
            dd=line.split(FS) ;
            for( int ii=0; i<dd.length; ++i)
                System.out.println(ii+"-for-"+dd[ii] + " at i=" + i) ;

            System.out.println(i + "$=" +dd.length) ;

            sb.append(line);
        }
        System.out.println("6666666666666666") ;

        String l="1345104845330@2012-08-16;04:14:05;3.05;1235;1818;0;323;43;0;154;39;0;125;19;0;125;19;0;128;23;0;168;56;0;151;44;0;204;80;0;201;94;0;160;52;0;214;101;0;87;11;1006;151;29;29" ;
        String [] dd= new String[100] ;
        dd=l.split(";");
        System.out.println(l.split(";").length+" " +dd.length);
        for( int ii=0; ii<27; ++ii){
            System.out.println(ii+"-for-"+dd[ii] + " at i=" + i) ;
         }
    }

    @Override
    public void begin() {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void body(String[] args) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void end() {
        // TODO Auto-generated method stub
        
    }
}
